﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using Sharp.Portal;
using Sharp.Portal.AdminLTE;
using Sharp.Portal.Mvc;
using Sharp.Portal.Mvc.Models;
using Sharp.Portal.Mvc.Form;

namespace Sharp.WebBooter.Areas.Platform.Models
{
    /// <summary>
    /// 角色
    /// </summary>
    [ItemPage(OpenWith = OpenWith.Window)]
    public class RoleViewModel : ISharpForm
    {
        public RoleViewModel()
        {
            UI = new BSSharpFrom(this);
        }
        [HiddenInput]
        public int Id { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        [Display(Name = "名称"),Required]
        public string Name { get; set; }
        /// <summary>
        /// 所属组织
        /// </summary>
        [Display(Name = "所属组织"), Required, CustomField(FieldType.OrgTreeList)]
        public System.Guid? OrgId { get; set; }
        /// <summary>
        /// OrgId 的数据源
        /// </summary>
        public zTreeNode OrgIdDataSource { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Display(Name = "备注"), DataType(DataType.MultilineText)]
        public string Remark { get; set; }

        public SharpFrom UI { get; set; }
    }
}

